"""django_server URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.urls import path
from .views import TestView, JwtTestView, LoginView, SaveView, PwdView \
    , AvatarView, SearchView, ActionView, CheckView, PasswordView \
    , StatusView, GrantRole, UserMenus, ImageView

urlpatterns = [
    path("test/", TestView.as_view(), name="test"),
    path("login", LoginView.as_view(), name="login"),
    path("save", SaveView.as_view(), name="save"),
    path("updateUserPwd", PwdView.as_view(), name="updateUserPwd"),
    path("updateAvatar", AvatarView.as_view(), name="updateAvatar"),
    path("uploadImage", ImageView.as_view(), name="updateAvatar"),
    path("jwt_test/", JwtTestView.as_view(), name="jwt_test"),
    path('search', SearchView.as_view(), name='search'),  # 用户信息查询
    path('action', ActionView.as_view(), name='action'),  # 获取用户信息
    path('check', CheckView.as_view(), name='check'),  # 用户信息查询
    path('resetPassword', PasswordView.as_view(), name='resetPassword'),  # 重置密码
    path('status', StatusView.as_view(), name='status'),  # 状态修改
    path('grantRole', GrantRole.as_view(), name='grant'),  # 角色授权
    path('userMenus', UserMenus.as_view(), name='grant'),  # 用户权限菜单

]
